import java.util.*;

final public class HTTP {
	//Carriage Return, Line Feed
	final static int CR = '\r';
	final static int LF = '\n';
	
	//methods
	final static String METHOD_GET = "GET";
	final static String METHOD_POST = "POST";
	final static String METHOD_HEAD = "HEAD";
	
	//version
	final static String HTTP_0_9 = "HTTP/0.9";
	final static String HTTP_1_0 = "HTTP/1.0";
	final static String HTTP_1_1 = "HTTP/1.1";
	
	//status
	final static int STATUS_OK = 200;
	final static int STATUS_NO_CONTENT = 204;
	final static int STATUS_MOVED_PERMANENTLY = 301;
	final static int STATUS_MOVED_TEMPORARILY = 302;
	final static int STATUS_BAD_REQUEST = 400;
	final static int STATUS_FORBIDDEN = 403;
	final static int STATUS_NOT_FOUND = 404;
	final static int STATUS_NOT_ALLOWED = 405;
	final static int STATUS_INTERNAL_ERROR = 500;
	final static int STATUS_NOT_IMPLEMENTED = 501;
	
	//MINEs
	final static Hashtable<String, String> MIME_TYPE = new Hashtable<String, String>();
	
	static {
		MIME_TYPE.put("ai", "application/postscript");
		MIME_TYPE.put("eps", "application/postscript");
		MIME_TYPE.put("ps", "application/postscript");
		MIME_TYPE.put("rtf", "application/rtf");
		MIME_TYPE.put("z", "application/x-compress");
		MIME_TYPE.put("gtar", "application/x-gtar");
		MIME_TYPE.put("gz", "application/xgzip");
		MIME_TYPE.put("cgi", "application/x-http-cgi");
		MIME_TYPE.put("zip", "application/zip");
		MIME_TYPE.put("au", "audio/basic");
		MIME_TYPE.put("snd", "audio/basic");
		MIME_TYPE.put("mpga", "audio/mpeg");
		MIME_TYPE.put("mp2", "audio/mpeg");
		MIME_TYPE.put("aif", "audio/x-aiff");
		MIME_TYPE.put("aiff", "audio/x-aiff");
		MIME_TYPE.put("aifc", "audio/x-aiff");
		MIME_TYPE.put("ram", "audio/x-pn-realaudio");
		MIME_TYPE.put("rpm", "audio/x-pn-realaudio-plugin");
		MIME_TYPE.put("ra", "audio/x-realaudio");
		MIME_TYPE.put("wav", "audio/x-wav");
		MIME_TYPE.put("gif", "image/gif");
		MIME_TYPE.put("ief", "image/ief");
		MIME_TYPE.put("jpeg", "image/jpeg");
		MIME_TYPE.put("jpg", "image/jpeg");
		MIME_TYPE.put("jpe", "image/jpeg");
		MIME_TYPE.put("png", "image/png");
		MIME_TYPE.put("tif", "image/tiff");
		MIME_TYPE.put("tiff", "image/tiff");
		MIME_TYPE.put("ras", "image/x-cmu-raster");
		MIME_TYPE.put("rgb", "image/x-rgb");
		MIME_TYPE.put("xbm", "image/x-xbitmap");
		MIME_TYPE.put("html", "text/html");
		MIME_TYPE.put("htm", "text/html");
		MIME_TYPE.put("txt", "text/plain");
		MIME_TYPE.put("rtx", "text/richtext");
		MIME_TYPE.put("css", "text/css");
		MIME_TYPE.put("sgml", "text/x-sgml");
		MIME_TYPE.put("sgm", "text/x-sgml");
		MIME_TYPE.put("mpg", "video/mpeg");
		MIME_TYPE.put("mpeg", "video/mpeg");
		MIME_TYPE.put("mpe", "video/mpeg");
		MIME_TYPE.put("qt", "video/quicktime");
		MIME_TYPE.put("mov", "video/quicktime");
		MIME_TYPE.put("avi", "video/msvideo");
		MIME_TYPE.put("xml", "text/xml");
		MIME_TYPE.put("xsl", "text/xsl");
	}
}
